<template>
  <div class="container">
    <DataList
      ref="dataList"
      :propAutoFetchData="true"
      :propNoCheck="true"
      :propSearchFields="['applyCode']"
      :propSearchTextAppend="'申请单号'"
      propUrl="base/hospital_suppliers/pageCommon"
      :showFieldList="cpShowFieldList"
      :vanFieldLabelWith5="true"
      :sortDefault="{field: 'gmtCreate',type: 'desc'}"
    >
    </DataList>
  </div>
</template>

<script>

export default {
  help: '已供货医院-列表',
  data() {
    return {
    }
  },
  methods: {
  },
  computed: {
    cpShowFieldList() {
      /** 配置说明
       ,sortDisabled: true 不可排序
       ,filterDisabled: true  更多搜索时不展示
       ,filterOrder: 1  更多搜索字段显示顺序，不指定则按照传入字段顺序，可以只改某些字段顺序为负数，这样就可以排前面
       ,showDisabled: true  列表内容区域不显示
       ,showFormOpenDisabled: true  详情表单不显示
       ,showAllDisabled: true   表格、表单、搜索都不显示
       ,titleSubWithLabel: true   内容显示标题
       **/

      let fieldList = [
        {
          label: '启用', name: 'inactive', span: 12, flagBoolean: true,
          isTitleSub: true,isTitleSubWithLabel: true,
          queryType: this.constCommon.formItemType.switch.name,
          queryConfig: {
            dictType: this.constCommon.dictType.commonYesNo
          }
        },
        { label: '申请单号', name: 'applyCode', span: 12 },
        { label: '申请原因', name: 'applyRemark', span: 24 },
        {
          label: '审核时间', name: 'gmtAudited', span: 24,
          queryType: this.constCommon.formItemType.datePickerBetween.name
        },
        { label: '创建时间', name: 'gmtCreate', span: 24,filterDisabled: true }
      ]
      fieldList = [ ...this.constCommon.filterCommon.spAndHp(),...fieldList]

      fieldList[1].isTitle = true
      return fieldList
    }
  }
}
</script>
